home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / REFERENC / TPR / SOURCE.EXE / TCMDSET.PAS < prev    next >
Pascal/Delphi Source File  |  1992-08-07  |  517b  |  22 lines

  1. { TCMDSET.PAS }
  2. { Example using TCommandSet, from TVSHELL8.PAS }
  3. var
  4.   CommandsOn : TCommandSet;
  5.   CommandsOff : TCommandSet;
  6.   ...
  7.   CommandsOn := [cmUseDOS, cmDelete];
  8.   CommandsOff := CommandsOn;
  9.  
  10.   if  (SetUpData.ProgOptions and 2) = 2  then
  11.     CommandsOff := CommandsOff - [cmUseDOS];
  12.  
  13.   if  (SetUpData.ProgOptions and 4) = 4  then
  14.     CommandsOff := CommandsOff - [cmDelete];
  15.  
  16.   CommandsOn := CommandsOn - CommandsOff;
  17.  
  18.   DisableCommands( CommandsOff );
  19.   EnableCommands( CommandsOn );
  20.  
  21.  
  22.